<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>我的收藏</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../css/aui.css">
     <link rel="stylesheet" href="../../css/common.css">
         <script type="text/javascript" src="../../script/api.js"></script>
    <script language="JavaScript" src="../../script/vue.js"></script>
     <script language="JavaScript" src="../../script/common.js"></script>
    <link rel="stylesheet" href="../../css/orderitem.css">
 </head>
<body>

<style>
.order-item{
    border-bottom: .2rem solid #f1f1f2;
}
.productbtn{
    border-top:1px solid #f1f1f2;
}
#fav-box .aui-active{
    color:#e02e24;
    border-bottom: 2px solid #e02e24;
}
.product .product-title,.product-price{
    margin-left: 0.5rem;
}
.btn-dian{
    border:#cccccc solid 1px;
    font-size: 0.6rem;
    line-height: 1.2rem;
    width: 5rem;
    color:#58595b;
    border-radius:0.2rem;
    justify-content:center;
    margin-right: 0.5rem;
}
</style>
<div id="fav-box">
  <header class="aui-bar aui-bar-nav" id="header">
      <a class="aui-pull-left aui-btn" onclick="closewin();">
          <span class="aui-iconfont aui-icon-left"></span>
      </a>
      <div class="aui-title">收藏</div>
  </header>
<div class="aui-content bg-white">
    <div class="aui-tab" id="tab">
        <div class="aui-tab-item" :class="{'aui-active':tabname==='product'}"  @click="openfav('product')">商品</div>
        <div class="aui-tab-item" :class="{'aui-active':tabname==='shop'}"   @click="openfav('shop')"> 店铺</div>
    </div>
</div>

</div>

<script>
    var pvm = new Vue({
        el:'#fav-box',
        data:{
             tabname:'product',
             token:'',
        },
        methods:{
          openfav:function(tabname){

            this.tabname=tabname;
            var headerh = $api.dom("#fav-box").offsetHeight;
            $page.openfrm('home_fav_frm'+tabname,'./fav_frame.html',{x:0,y:headerh,h:api.winHeight-headerh},{tabname:this.tabname},false,true);
          },
            load_init:function(){

                pvm.openfav('product');
            }
        }
    });

    apiready=function(){
      var token = $api.getStorage('token');

 
      pvm.token = $api.getStorage('token');
      pvm.load_init();
      $page.init();

    }
</script>

</body>
</html>
